package com.cyt.work.question.model.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 模板导出
 *
 * @author congcong tao
 * @create 2019/9/3 13:40
 */
@Data
public class QuestionUserImportVo implements Serializable {

    @Excel(name = "*工号/学号")
    @NotBlank(message = "工号/学号不能为空")
    private String userNumber;

    @Excel(name = "*姓名")
    @NotBlank(message = "姓名不能为空")
    private String name;

    @Excel(name = "*人员角色", dict = "wx_education_user_type")
    @NotBlank(message = "人员角色不能为空")
    private String userType;

    @Excel(name = "*手机号", isImportField = "true_st")
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^[1](([3|5|8][\\d])|([4][4,5,6,7,8,9])|([6][2,5,6,7])|([7][^9])|([9][1,8,9]))[\\d]{8}$", message = "请输入正确的手机号")
    private String mobile;

    public QuestionUserImportVo() {
    }

    public QuestionUserImportVo(String userNumber, String name, String userType, String mobile) {
        this.userNumber = userNumber;
        this.name = name;
        this.userType = userType;
        this.mobile = mobile;
    }
}